home *** CD-ROM | disk | FTP | other *** search
/ Light / Light_Vol.1_August_1992_Datasphere_Publications_Disk_1_of_2_Side_A.d64 / bitmap configure (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  3KB  |  76 lines

  1. 100 rem "---------------------------------------------------------------------"
  2. 110 def fn d(h)=h-48+7*(h>64)
  3. 120 poke 53280,11:poke 53281,12:print chr$(144)chr$(147)chr$(14)chr$(8)
  4. 130 print "      [194]itmap [208]rinter configurator"
  5. 140 print "      [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  6. 150 print:print "   [208]rogrammed by [199][207][207][211][197]      [205]ay 1992"
  7. 160 print:print:print "[204]oading [194]itmap [208]rinter"
  8. 170 f$="@0:bitmap printer":for a=1 to 17:poke 679+a,asc(mid$(f$,a,1)):next a
  9. 180 poke 780,14:poke 781,171:poke 782,2:sys 65469:rem "[211][197][212][206][193][205]"
  10. 190 poke 780,0:poke 781,8:poke 782,0:sys 65466:   rem "[211][197][212][204][198][211]"
  11. 200 poke 780,0:poke 781,1:poke 782,192:sys 65493: rem "[204][207][193][196]"
  12. 210 el=peek(781):eh=peek(782)
  13. 220 print:print "[208]rinter feed codes: ";:a=49997:c=4:gosub 430
  14. 230 print:print "[208]rinter setup code: ";:a=50130:gosub 400
  15. 240 print:print "[199]raphic line code: ";:a=50609:gosub 400
  16. 250 print:print "[194]itmap setup code: ";:a=51348:gosub 400
  17. 260 print:print "[194]itmap restore code: ";:a=51365:gosub 400
  18. 270 print:print "[211]aving [194]itmap [208]rinter"
  19. 280 poke 780,17:poke 781,168:poke 782,2:sys 65469:  remclose"[211][197][212][206][193][205]"
  20. 290 poke 780,1:poke 781,8:poke 782,1:sys 65466:     rem "[211][197][212][204][198][211]"
  21. 300 poke 251,1:poke 252,192
  22. 310 poke 780,251:poke 781,el:poke 782,eh:sys 65496: rem "[211][193][214][197]"
  23. 320 end
  24. 390 :
  25. 400 gosub 450:if d>16 then print:print "[212]oo many bytes in code":end
  26. 410 poke a,d:c=d
  27. 420 :
  28. 430 for b=1 to c:gosub 450:poke a+b,d:next b:print "data [207][203]":return
  29. 440 :
  30. 450 read h$:if left$(h$,1)<>"$" then d=val(h$):goto 470
  31. 460 h=asc(mid$(h$,2,1)):d=fn d(h)*16:h=asc(mid$(h$,3,1)):d=d+fn d(h)
  32. 470 if d>255 then print:print "[206]umber too large":end
  33. 480 return
  34. 490 :
  35. 500 rem "---------------------------------------------------------------------"
  36. 510 rem "[208]rinter feed codes"
  37. 520 :
  38. 530 data 13                             :rem "[195]arriage [210]eturn"
  39. 540 data 0                              :rem "[204]ine [198]eed (0 if not required)"
  40. 550 data $0b                            :rem "[214]ertical [212]ab"
  41. 560 data $0c                            :rem "[198]orm [198]eed"
  42. 590 :
  43. 600 rem "---------------------------------------------------------------------"
  44. 610 rem "[208]rinter setup code"
  45. 620 :
  46. 630 data 16                             :rem "[206]umber of bytes in code"
  47. 640 data 13,13,13,13,13,13              :rem "[211]et top margin (6 line feeds)
  48. 650 [131] $1b,$40                        :[143] "(NULL)eset printer"
  49. 660 [131] $1b,$4d                        :[143] "(NULL)et vallite pitch (12 cpi)
  50. 670 data $1b,$6c,$08                    :rem "[211]et left margin (8 characters)
  51. 680 [131] $1b,$78,$01                    :[143] "(NULL)et lenorrespondence (NULL)uality mode"
  52. 690 :
  53. 700 [143] "---------------------------------------------------------------------"
  54. 710 [143] "chr$raphic line code"
  55. 720 :
  56. 730 [131] 4                              :[143] "(NULL)umber of bytes in code"
  57. 740 [131] $1b,$4c,$80,$02            :[143] "(NULL)et double density for 640 bytes"
  58. 790 :
  59. 800 [143] "---------------------------------------------------------------------"
  60. 810 [143] "peekitmap setup code"
  61. 820 :
  62. 830 [131] 13                             :[143] "(NULL)umber of bytes in code"
  63. 840 [131] $1b,$7e,$30,$01                :[143] "(NULL)et 1/144 inch line spacing"
  64. 850 [131] $1b,$65,$01,$10                :[143] "(NULL)et fixed (NULL)(NULL)ab to 16 lines"
  65. 860 [131] $1b,$6c,$10                    :[143] "(NULL)et left margin to centre bitmap"
  66. 870 [131] $0b,$0b                        :[143] "(NULL)(NULL)ab to position of bitmap"
  67. 890 :
  68. 900 [143] "---------------------------------------------------------------------"
  69. 910 [143] "peekitmap restore code"
  70. 920 :
  71. 930 [131] 7                              :[143] "(NULL)umber of bytes in code"
  72. 940 [131] $0b,$0b                        :[143] "(NULL)(NULL)ab to position of footnote"
  73. 950 [131] $1b,$32                        :[143] "(NULL)estore line spacing to 1/6 inch"
  74. 960 [131] $1b,$6c,$08                    :[143] "(NULL)estore left margin to 8 char's"
  75. 990 :
  76.